package com.yiji.fintech.musfinance.common.strategy.converter;

import com.yiji.fintech.musfinance.common.domain.SignDomain;
import com.yiji.fintech.musfinance.common.domain.base.BaseDomain;
import com.yiji.fintech.musfinance.common.domain.channel.ChannelDomain;
import com.yiji.fintech.musfinance.common.strategy.base.AbstractContext2DomainStrategy;
import org.springframework.stereotype.Service;

/**
 *  路由渠道上线文转换SignDomain
 * Created by ouwen@yiji.com} on 2017/9/27.
 */
@Service
public class Context2SignDomainStrategy extends AbstractContext2DomainStrategy {
    @Override
    public void doExcute(ChannelDomain channelDomain, BaseDomain domain) {
        SignDomain signDomain = (SignDomain) domain;
        signDomain.setGatewayChannelApi(channelDomain.getInstChannelApis().get(0).getGatewayChannelApi());
    }
}
